//
//  NSGradient+WCExtensions.m
//  WabbitCode
//
//  Created by William Towe on 12/17/08.
//  Copyright 2008 Revolution Software. All rights reserved.
//

#import "NSGradient+WCExtensions.h"


@implementation NSGradient (WCExtensions)
+ (NSGradient *)gradientWithStartingColor:(NSColor *)startingColor endingColor:(NSColor *)endingColor; {
	return [[[[self class] alloc] initWithStartingColor:startingColor endingColor:endingColor] autorelease];
}

+ (NSGradient *)aquaNormalGradient; {
	return [[[[self class] alloc] initWithColorsAndLocations:[NSColor colorWithCalibratedWhite:0.95 alpha:1.0], 0.0, [NSColor colorWithCalibratedWhite:0.83 alpha:1.0], 0.5, [NSColor colorWithCalibratedWhite:0.95 alpha:1.0], 0.5, [NSColor colorWithCalibratedWhite:0.92 alpha:1.0], 1.0, nil] autorelease];
}

+ (NSGradient *)aquaPressedGradient; {
	return [[[[self class] alloc] initWithColorsAndLocations:[NSColor colorWithCalibratedWhite:0.80 alpha:1.0], 0.0, [NSColor colorWithCalibratedWhite:0.64 alpha:1.0], 0.5, [NSColor colorWithCalibratedWhite:0.80 alpha:1.0], 0.5, [NSColor colorWithCalibratedWhite:0.77 alpha:1.0], 1.0, nil] autorelease];
}

+ (NSGradient *)aquaSelectedGradient; {
	return [[[[self class] alloc] initWithColorsAndLocations:[NSColor colorWithCalibratedRed:0.58 green:0.86 blue:0.98 alpha:1.0], 0.0, [NSColor colorWithCalibratedRed:0.42 green:0.68 blue:0.90 alpha:1.0], 0.5, [NSColor colorWithCalibratedRed:0.64 green:0.80 blue:0.94 alpha:1.0], 0.5, [NSColor colorWithCalibratedRed:0.56 green:0.70 blue:0.90 alpha:1.0], 1.0, nil] autorelease];
}

+ (NSGradient *)groupGradient; {
	return [[[[self class] alloc] initWithStartingColor:[NSColor colorWithCalibratedWhite:245.0/255.0 alpha:1.0] endingColor:[NSColor colorWithCalibratedWhite:215.0/255.0 alpha:1.0]] autorelease];
}

+ (NSGradient *)windowActiveFrameGradient; {
	return [[[NSGradient alloc] initWithStartingColor:[NSColor colorWithCalibratedWhite:197.0/255.0 alpha:1.0] endingColor:[NSColor colorWithCalibratedWhite:150.0/255.0 alpha:1.0]] autorelease];
}

+ (NSGradient *)windowInactiveFrameGradient; {
	return [[[NSGradient alloc] initWithStartingColor:[NSColor colorWithCalibratedWhite:233.0/255.0 alpha:1.0] endingColor:[NSColor colorWithCalibratedWhite:207.0/255.0 alpha:1.0]] autorelease];
}
@end
